﻿//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="DylanBox">
// Copyright (c) DylanBox Corporation. All rights reserved.
// </copyright>
// <summary>
//      Sample of refactoring, Version 1.0.0.4
//      
//      Refactoring 4: 
//          Extract method of "Rental.GetPoints()"
//      
// </summary>
// <reference>
//    <<Refactoring: Improving the design of existing code>>
// </reference>
// <author>Dylan</author>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace RentalCalcV4
{
    class Program
    {
        static void Main(string[] args)
        {
            Customer dylan = new Customer("Dylan");

            dylan.AddRental(
                new Rental
                {
                    RentedMovie = new Movie { Title = "Gone with wind", PriceCode = Movie.WAR },
                    DaysRented = 3
                }
                );

            dylan.AddRental(
                new Rental
                {
                    RentedMovie = new Movie{ Title = "Cubic", PriceCode = Movie.EMOTION },
                    DaysRented = 2
                }
                );

            Console.WriteLine(Assembly.GetExecutingAssembly().GetName().Name + ":\t" + Assembly.GetExecutingAssembly().GetName().Version);
            Console.WriteLine(dylan.Statement());
            Console.Read();            
        }
    }
}
